/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-04-20 10:20:09
 * @Description  : 获取系统配置的hooks
 */
import type { IndexObj } from '@/types/commom'
import { getUnLoginSystemOptionList } from '@/api/systemOption'
export const useSystemInfo = () => {
  const systemInfo = ref<IndexObj>({})
  const loadSystemOption = () => {
    getUnLoginSystemOptionList()
      .then((res) => {
        systemInfo.value = res.data
      })
      .catch(console.error)
  }

  onMounted(() => {
    loadSystemOption()
  })

  return {
    systemInfo
  }
}
